tools/ocaml/xb: Add BoundedQueue
authorEdwin Török <edvin.torok@citrix.com>
Wed, 12 Oct 2022 18:13:03 +0000 (19:13 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Nov 2022 13:05:44 +0000 (13:05 +0000)
commit19171fb5d888b4467a7073e8febc5e05540956e9
tree9a6bbfbbb5a229ff5f5d40b01cbbcd3f216a13af
parentc0a86a462721008eca5ff733660de094d3c34bc7
tools/ocaml/xb: Add BoundedQueue

Ensures we cannot store more than [capacity] elements in a [Queue].  Replacing
all Queue with this module will then ensure at compile time that all Queues
are correctly bound checked.

Each element in the queue has a class with its own limits.  This, in a
subsequent change, will ensure that command responses can proceed during a
flood of watch events.

No functional change.

This is part of XSA-326.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
tools/ocaml/libs/xb/xb.ml